package room;

import genericObject.GenericObject;

import java.util.ArrayList;
import java.util.Stack;

import returnTypes.Status;
import roomType.RoomType;

import wall.Wall;


public class Room {
	private ArrayList<Wall> walls = null;
	private ArrayList<GenericObject> objects = null;
	private String roomName = null;
	private RoomType roomType = null;
	private Status state;
	private static int roomID = 1;
	private int thisRoomID = roomID;
	/**
	 * @return the walls
	 */
	public Room()
	{
		walls=new ArrayList<Wall>();
	}
	
	public ArrayList<Wall> getWalls() {
		return walls;
	}
	
	public Room(Stack<Wall> stackWalls)
	{
		walls=new ArrayList<Wall>();
		while(stackWalls.size()!=0)
			walls.add(stackWalls.pop());
		thisRoomID=roomID;
		roomID++;
	}	
	
	public void AddWall(Wall newWall)
	{
		walls.add(newWall);
	}

	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}

	public String getRoomName() {
		return roomName;
	}

	public void setRoomType(RoomType roomType) {
		this.roomType = roomType;
	}

	public RoomType getRoomType() {
		return roomType;
	}
	
	public void printRoom()
	{
		System.out.println(roomName);
		System.out.println(roomType);
		System.out.println("Walls ... ");
		for(int i=0;i<walls.size();i++)
		{
			System.out.println(walls.get(i));
		}
		System.out.println();
	}

	public static int getRoomID() {
		return roomID;
	}
	
	public void addObject(GenericObject obj)
	{
		objects.add(obj);
	}

	public ArrayList<GenericObject> getObjects() {
		return objects;
	}

	public void setState(Status state) {
		this.state = state;
	}

	public Status getState() {
		return state;
	}

	public void setThisRoomID(int thisRoomID) {
		this.thisRoomID = thisRoomID;
	}

	public int getThisRoomID() {
		return thisRoomID;
	}


	
}
